<?php /*a:3:{s:67:"D:\phpstudy_pro\WWW\git\DSShop\app\admin\view\vrgroupbuy\index.html";i:1567072618;s:64:"D:\phpstudy_pro\WWW\git\DSShop\app\admin\view\public\header.html";i:1571626691;s:69:"D:\phpstudy_pro\WWW\git\DSShop\app\admin\view\public\admin_items.html";i:1566788179;}*/ ?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>DSShop单店铺商城系统后台</title>
        <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
        <link rel="stylesheet" href="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/css/admin.css">
        <link rel="stylesheet" href="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.css">
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery-2.1.4.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.validate.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.cookie.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/common.js"></script>
        <script src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/js/admin.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery.ui.datepicker-zh-CN.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/perfect-scrollbar.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/layer/layer.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/dialog/dialog.js" id="dialog_js" charset="utf-8"></script>

        <script type="text/javascript">
            var BASESITEROOT = "<?php echo htmlentities(BASE_SITE_ROOT); ?>";
            var ADMINSITEROOT = "<?php echo htmlentities(ADMIN_SITE_ROOT); ?>";
            var BASESITEURL = "<?php echo htmlentities(BASE_SITE_URL); ?>";
            var HOMESITEURL = "<?php echo htmlentities(HOME_SITE_URL); ?>";
            var ADMINSITEURL = "<?php echo htmlentities(ADMIN_SITE_URL); ?>";
        </script>
    </head>
    <body>
        <div id="append_parent"></div>
        <div id="ajaxwaitid"></div>








<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>分类管理</h3>
                <h5></h5>
            </div>
            <?php if($admin_item): ?>
<ul class="tab-base ds-row">
    <?php if(is_array($admin_item) || $admin_item instanceof \think\Collection || $admin_item instanceof \think\Paginator): if( count($admin_item)==0 ) : echo "" ;else: foreach($admin_item as $key=>$item): ?>
    <li><a href="<?php echo htmlentities($item['url']); ?>" <?php if($item['name'] == $curitem): ?>class="current"<?php endif; ?>><span><?php echo htmlentities($item['text']); ?></span></a></li>
    <?php endforeach; endif; else: echo "" ;endif; ?>
</ul>
<?php endif; ?>
        </div>
    </div>

    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom">
            <h4 title="<?php echo htmlentities(lang('ds_explanation_tip')); ?>"><?php echo htmlentities(lang('ds_explanation')); ?></h4>
            <span id="explanationZoom" title="<?php echo htmlentities(lang('ds_explanation_close')); ?>" class="arrow"></span>
        </div>
        <ul>
            <li>商家发布虚拟商品的抢购时，需要选择虚拟抢购所属分类</li>
            <li>通过修改排序数字可以控制前台线下商城分类的显示顺序，数字越小越靠前</li>
            <li>可以对分类名称进行修改,可以新增下级分类</li>
            <li>可以对分类进行编辑、删除操作</li>
            <li>点击行首的"+"号，可以展开下级分类</li>
        </ul>
    </div>
    
        <table class="ds-default-table">
            <thead>
            <tr class="thead">
                <th></th>
                <th><?php echo htmlentities(lang('ds_sort')); ?></th>
                <th>分类名称</th>
                <th><?php echo htmlentities(lang('ds_handle')); ?></th>
            </tr>
            </thead>
            <tbody>
            <?php if(!(empty($vrgroupbuyclass_list) || (($vrgroupbuyclass_list instanceof \think\Collection || $vrgroupbuyclass_list instanceof \think\Paginator ) && $vrgroupbuyclass_list->isEmpty()))): if(is_array($vrgroupbuyclass_list) || $vrgroupbuyclass_list instanceof \think\Collection || $vrgroupbuyclass_list instanceof \think\Paginator): if( count($vrgroupbuyclass_list)==0 ) : echo "" ;else: foreach($vrgroupbuyclass_list as $key=>$val): if($val['vrgclass_parent_id'] == '0'): ?>
            <tr class="hover edit">
                <td class="w48">
                    <input type="checkbox" value="<?php echo htmlentities($val['vrgclass_id']); ?>" class="checkitem">
                    <img class="class_parent" class_id="class_id<?php echo htmlentities($val['vrgclass_id']); ?>" status="open" src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/images/treetable/tv-expandable.gif">
                </td>
                <td class="w48 sort">
                    <span ds_type="inline_edit" ajax_branch="class" column_id="<?php echo htmlentities($val['vrgclass_id']); ?>" title="<?php echo htmlentities(lang('ds_editable')); ?>" class="editable tooltip" fieldid="<?php echo htmlentities($val['vrgclass_id']); ?>" fieldname="vrgclass_sort" ><?php echo htmlentities($val['vrgclass_sort']); ?></span>
                </td>
                <td class="name">
                    <span ds_type="inline_edit" ajax_branch="class" column_id="<?php echo htmlentities($val['vrgclass_id']); ?>" title="<?php echo htmlentities(lang('ds_editable')); ?>" class="editable tooltip" fieldname="vrgclass_name" fieldid="<?php echo htmlentities($val['vrgclass_id']); ?>"><?php echo htmlentities($val['vrgclass_name']); ?></span>
                    <a class="btn-add-nofloat marginleft" href="javascript:dsLayerOpen('<?php echo url('Vrgroupbuy/class_add',['vrgclass_parent_id'=>$val['vrgclass_id']]); ?>','<?php echo htmlentities(lang('ds_add_sub_class')); ?>')"><span>新增下级</span></a>
                </td>
                <td>
                    <a href="javascript:dsLayerOpen('<?php echo url('Vrgroupbuy/class_edit',['vrgclass_id'=>$val['vrgclass_id']]); ?>','<?php echo htmlentities(lang('ds_edit')); ?>')" class="dsui-btn-edit"><i class="iconfont"></i><?php echo htmlentities(lang('ds_edit')); ?></a>
                    <a href="javascript:submit_delete(<?php echo htmlentities($val['vrgclass_id']); ?>)" class="dsui-btn-del"><i class="iconfont"></i><?php echo htmlentities(lang('ds_del')); ?></a>
                </td>
            </tr>
            <?php if(is_array($vrgroupbuyclass_list) || $vrgroupbuyclass_list instanceof \think\Collection || $vrgroupbuyclass_list instanceof \think\Paginator): if( count($vrgroupbuyclass_list)==0 ) : echo "" ;else: foreach($vrgroupbuyclass_list as $key=>$vall): if($vall['vrgclass_parent_id'] == $val['vrgclass_id']): ?>
            <tr class="hover edit class_id<?php echo htmlentities($val['vrgclass_id']); ?>" style="display:none;">
                <td class="w48"><input type="checkbox" value="<?php echo htmlentities($vall['vrgclass_id']); ?>" class="checkitem"></td>
                <td class="w48 sort"><span ds_type="inline_edit" ajax_branch="class" column_id="<?php echo htmlentities($vall['vrgclass_id']); ?>" title="<?php echo htmlentities(lang('ds_editable')); ?>" class="editable tooltip" fieldid="<?php echo htmlentities($vall['vrgclass_id']); ?>" fieldname="vrgclass_sort" ><?php echo htmlentities($vall['vrgclass_sort']); ?></span></td>
                <td class="name"><span ds_type="inline_edit" ajax_branch="class" column_id="<?php echo htmlentities($vall['vrgclass_id']); ?>" title="<?php echo htmlentities(lang('ds_editable')); ?>" class="editable tooltip" fieldname="vrgclass_name" fieldid="<?php echo htmlentities($vall['vrgclass_id']); ?>"><?php echo htmlentities($vall['vrgclass_name']); ?></span></td>
                <td>
                    <a href="javascript:dsLayerOpen('<?php echo url('Vrgroupbuy/class_edit',['vrgclass_id'=>$vall['vrgclass_id']]); ?>','<?php echo htmlentities(lang('ds_edit')); ?>')" class="dsui-btn-edit"><i class="iconfont"></i><?php echo htmlentities(lang('ds_edit')); ?></a>
                    <a href="javascript:submit_delete(<?php echo htmlentities($vall['vrgclass_id']); ?>)" class="dsui-btn-del"><i class="iconfont"></i><?php echo htmlentities(lang('ds_del')); ?></a>
                </td>
            </tr>
            <?php endif; ?>
            <?php endforeach; endif; else: echo "" ;endif; ?>
            <?php endif; ?>
            <?php endforeach; endif; else: echo "" ;endif; else: ?>
            <tr class="no_data">
                <td colspan="10"><?php echo htmlentities(lang('ds_no_record')); ?></td>
            </tr>
            <?php endif; ?>
            </tbody>
            <?php if(!(empty($vrgroupbuyclass_list) || (($vrgroupbuyclass_list instanceof \think\Collection || $vrgroupbuyclass_list instanceof \think\Paginator ) && $vrgroupbuyclass_list->isEmpty()))): ?>
            <tfoot>
                <tr class="tfoot">
                    <td><input type="checkbox" class="checkall" id="checkall_1"></td>
                    <td id="batchAction" colspan="15">
                        <span class="all_checkbox"><label for="checkall_1"><?php echo htmlentities(lang('ds_select_all')); ?></label></span>&nbsp;&nbsp; 
                        <a href="javascript:void(0)" class="btn btn-small" onclick="submit_delete_batch();"><span><?php echo htmlentities(lang('ds_del')); ?></span></a>
                    </td>
                </tr>
            </tfoot>
            <?php endif; ?>
        </table>

</div>
<script type="text/javascript" src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/js/jquery.edit.js" charset="utf-8"></script>
<script type="text/javascript">
    $(function(){
        $(".class_parent").click(function() {
            if ($(this).attr("status") == "open") {
                $(this).attr("status","close");
                $(this).attr("src","<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/images/treetable/tv-collapsable.gif");
                $("."+$(this).attr("class_id")).show();
            } else {
                $(this).attr("status","open");
                $(this).attr("src","<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/images/treetable/tv-expandable.gif");
                $("."+$(this).attr("class_id")).hide();
            }
        });

        //行内ajax编辑
        $('span[ds_type="vrgclass_sort"]').inline_edit();
        $('span[ds_type="vrgclass_name"]').inline_edit();

    });
    function submit_delete(ids_str){
        _uri = ADMINSITEURL + "/Vrgroupbuy/class_del.html?vrgclass_id=" + ids_str;
        dsLayerConfirm(_uri, '<?php echo htmlentities(lang('ds_ensure_del')); ?>');
    }

</script>